home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / CHIPCD_02_2002.iso / Internet / Macromedia ColdFusion Server 5 / coldfusion-50-win-us.exe / data1.cab / Examples / CFDOCS / snippets / cferror.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  1.6 KB  |  54 lines

  1. <!--- This view-only example shows the use of CFERROR --->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>CFERROR Example</TITLE>
  5. </HEAD>
  6.  
  7. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  8. <BODY  bgcolor="#FFFFD5">
  9.  
  10. <H3>CFERROR Example</H3>
  11.  
  12. <P>CFERROR provides the ability to display customized
  13. HTML pages when errors occur. This allows you to
  14. maintain a consistent look and feel within your
  15. application even when errors occur. Note that no CFML
  16. can be displayed in the resulting templates except
  17. for the specialized error variables.
  18. <P>CFTRY/CFCATCH provides a more interactive way to
  19. handle your CF errors within a CF template than CFERROR,
  20. but CFERROR is still a good safeguard against general
  21. errors.
  22. <P>You can also use CFERROR within the Application.cfm
  23. to specify error handling responsibilities for an entire
  24. application.
  25.  
  26. <!--- Example of CFERROR call within a template --->
  27. <!--- <CFERROR TYPE="REQUEST"
  28.                TEMPLATE="request_err.cfm"
  29.                MAILTO="admin@mywebsite.com"> --->
  30.  
  31. <!--- Example of the template to handle this error --->
  32. <!---
  33. <HTML>
  34. <HEAD>
  35.     <TITLE>We're sorry -- An Error Occurred</TITLE>
  36. </HEAD>
  37.  
  38. <BODY>
  39. <UL>
  40. <CFOUTPUT>
  41.     <LI><B>Your Location:</B> #Error.RemoteAddress#
  42.     <LI><B>Your Browser:</B> #Error.Browser#
  43.     <LI><B>Date and Time the Error Occurred:</B> #Error.DateTime#
  44.     <LI><B>Page You Came From:</B> #Error.HTTPReferer#
  45.     <LI><B>Message Content</B>: <BR><HR width=50%><P>#Error.Diagnostics#<HR width=50%><P>
  46.     <LI><B>Please send questions to:</B> <a href="mailto:#Error.MailTo#">#Error.MailTo#</A>
  47. </CFOUTPUT>
  48. </UL>
  49. </BODY>
  50. </HTML>        --->
  51.  
  52. </BODY>
  53. </HTML>       
  54.